package io.renren.modules.wap.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.commons.dynamic.datasource.annotation.DataSource;
import io.renren.modules.wap.dao.AppInfoDao;
import io.renren.modules.wap.dto.AppInfoDTO;
import io.renren.modules.wap.entity.AppInfoEntity;
import io.renren.modules.wap.service.AppInfoService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * app采集信息
 *
 * @author Liang Pei 
 * @since 1.0.0 2025-01-02
 */
@Service
@DataSource("wap")
public class AppInfoServiceImpl extends CrudServiceImpl<AppInfoDao, AppInfoEntity, AppInfoDTO> implements AppInfoService {

    @Override
    public QueryWrapper<AppInfoEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<AppInfoEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}